from typing import List

from core.domain.core_domain_entities.page import Page
from core.domain.entity import Entity
from core.domain.enums import DocumentClass


class Document(Entity):
    def __init__(self, expected_class: DocumentClass, pages: List[Page]):
        self.expected_class = expected_class
        self.doc_class = DocumentClass.not_defined
        self.pages = pages

    def get_document_pages(self) -> List:
        return self.pages

    def assign_document_class(self, doc_class: DocumentClass):
        self.doc_class = doc_class

    def return_pages_text(self):
        pass

    def validate_document_class(self) -> bool:
        return self.doc_class == self.expected_class
